//
// Copyright © 2021 dev. All rights reserved.
// 

import Cocoa
@_exported import os.log



extension OSLog {
    static func agentLog(with category:String) -> OSLog {
        OSLog(subsystem: "io.wwdc.agent", category: category)
    }
}


@main
final class WWDCAgentAppDelegate: NSObject, NSApplicationDelegate {

    private let log = OSLog.agentLog(with: String(describing: WWDCAgentAppDelegate.self))

    private let service = WWDCAgentService()

    func applicationDidFinishLaunching(_ aNotification: Notification) {
        // Insert code here to initialize your application
        os_log("Agent runing",log:self.log,type:.debug)

        PathUtil.bundleIdentifier = "io.wwdc.app"
        service.start()
    }

    func applicationWillTerminate(_ aNotification: Notification) {
        // Insert code here to tear down your application
    }


}

